<!doctype html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>1000 Writes Complex</title>
    <script>
      window.process = { env: { NODE_ENV: 'development' } };
    </script>
  </head>

  <body>
    <div id="root"></div>
    <script type="module">
      import urqlClient from './urqlClient.js';
      import * as bench from '/bench.js';
      import { makeEntries } from './makeEntries.js';
      import { makeAuthor } from './entities.js';
      import { getAllAuthors, addAuthors } from './benchmarks.js';

      // create authors to be added/written
      const hundredAuthors = makeEntries(1000, makeAuthor);

      const benchmark = async () => {
        // measure how long write takes
        bench.start();
        await addAuthors(hundredAuthors);
        bench.stop();
      };

      benchmark();
    </script>
  </body>
</html>
